﻿using ModernChannel.Model.Interface;
using ModernChannel.Model.Model;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Common.Util;

namespace ModernChannel.Provider
{
    public class AdhocDetailProvider : GenericProvider, IAdhocDetailProvider
    {
        public AdhocDetail RetrieveAdhocDetail(string schemeId, string billtocode, string model)
        {
            var scheme = (schemeId ?? string.Empty).ToUpper();
            var billto = (billtocode ?? string.Empty).ToUpper();
            var modelU = (model ?? string.Empty).ToUpper();
            return repository.FindOne<AdhocDetail>(x => x.SchemeId.ToUpper() == scheme && x.BilltoCode.ToUpper() == billto && x.Model.ToUpper() == modelU);
        }
    }
}
